package com.zjm.structural.decorator.coffee;

public class CoffeeBar {
    public static void main(String[] args) {
        // 1.点一个LongBlack
        Drink order = new LongBlack();
        System.out.println("费用：" + order.cost());
        System.out.println("描述：" + order.getDesc());

        // 2.order加入牛奶
        order = new Milk(order);
        System.out.println("加入1牛奶，费用：" + order.cost());
        System.out.println("加入1牛奶，描述：" + order.getDesc());

        // 3.order加入巧克力
        order = new Chocolate(order);
        System.out.println("加入1牛奶，加入1巧克力，费用：" + order.cost());
        System.out.println("加入1牛奶，加入1巧克力，描述：" + order.getDesc());

        // 4.order加入巧克力
        order = new Chocolate(order);
        System.out.println("加入1牛奶，加入2巧克力，费用：" + order.cost());
        System.out.println("加入1牛奶，加入2巧克力，描述：" + order.getDesc());
    }
}
